﻿using System.Configuration;
using System.Globalization;
using System.Reflection;


namespace Research.FactoryDAL
{
    public class DataAccess<T> //: IFactory<T>
    {
        private static readonly string path = ConfigurationManager.AppSettings["FactoryKey"].ToString(CultureInfo.InvariantCulture);

        public static T Create(string dalName)
        {
            string vFullClassName = path + "." + dalName;
            return (T)Assembly.Load(path).CreateInstance(vFullClassName);
        }


    }

}
